import request from "@/utils/request";

// 列表页面
export function get_coupons_index(params) {
  return request({
    url: "/coupons/index",
    method: "get",
    params
  });
}

// 新增活动
export function get_coupons_add(data) {
  return request({
    url: "/coupons/add",
    method: "post",
    data: data
  });
}

// 编辑活动
export function get_coupons_edit(data) {
  return request({
    url: "/coupons/edit",
    method: "post",
    data: data
  });
}

//   详情
export function get_coupons_info(params) {
  return request({
    url: "/coupons/info",
    method: "get",
    params
  });
}
//   关闭
export function get_coupons_close(data) {
  return request({
    url: "/coupons/close",
    method: "post",
    data: data
  });
}
//   发放
export function get_coupons_grant(data) {
  return request({
    url: "/coupons/grant",
    method: "post",
    data: data
  });
}

//   日志
export function get_coupons_getLog(params) {
  return request({
    url: "/coupons/getLog",
    method: "get",
    params
  });
}

// 优惠券作废
export function get_blank_out(data) {
  return request({
    url: "/coupons/blankOut",
    method: "post",
    data: data
  });
}

// 优惠券发放搜索信息
export function get_grant_base(params) {
  return request({
    url: "/coupons/grantBase",
    method: "get",
    params
  });
}
// 优惠券发放获取用户

export function get_get_member(params) {
  return request({
    url: "/coupons/getMember",
    method: "get",
    params
  });
}

// 导出发放记录
export function exportLog(data) {
  return request({
    url: "/coupons/exportLog",
    method: "post",
    responseType: "blob",
    data: data
  });
}
